"""
sql语句：delete 删除
"""

from db_fixture import mycat_select


def sql_data(idNo):
    customerNo = mycat_select.select(idNo=idNo)
    # 额度信息
    edxi = 'DELETE FROMcrt_quota_pre_credit WHERE CARD_NO = %s;' % idNo
    # 额度平台贷信息
    edptxi = 'DELETE FROM crt_quota_pre_credit_item WHERE CARD_NO = %s;' % idNo
    # 平台贷主表已使用的
    dkzbysy = 'DELETE FROM tb_platform_quota_main WHERE ID_NO = %s;' % idNo
    # 放款银行信息表
    fkyhxxb = 'DELETE FROM tb_loan_account_base  WHERE CUSTOMER_NO = %s;' % customerNo
    # 贷款主表
    dkzb = 'DELETE FROM tb_loan_main WHERE CUSTOMER_NO = %s;' % customerNo
    # 虚户表
    xhb = 'DELETE FROM tb_virtual_account WHERE CUSTOMER_NO = %s;' % customerNo
    # 钱吧
    qb = 'DELETE FROM tb_qb_quota_apply_check WHERE  ID_NO = %s;' % idNo
    # 万享
    wx = 'DELETE FROM tb_wxtx_customer_info WHERE  ID_NO = %s;' % idNo
    # 同城邦
    tcb = 'DELETE FROM tb_tcb_customer_info WHERE  ID_NO = %s;' % idNo
    # 优啦金融
    yl = 'DELETE FROM tb_platform_quota_main WHERE  ID_NO = %s;' % idNo
    # SDK申请
    sdk = 'DELETE FROM CRT_QUOTA_APPLY WHERE CARD_NO = %s;' % idNo
    # kafka
    kfk = 'DELETE FROM tb_kafka_inft_msg WHERE BIZ_ID = %s;' % idNo
    # 待办
    dbrx = 'DELETE FROM crt_quota_change_apply_nostaff where ID_NO = %s;' % idNo

    list_table = [edxi, edptxi, dkzbysy, fkyhxxb, dkzb, xhb, qb, wx, tcb, yl, sdk, kfk, dbrx]

    # print(list_table)

    return list_table


if __name__ == '__main__':
    sql_data(idNo='620423198812141166')
